'Copyright (c) 2004 SJJ Embedded Micro Solutions, LLC
'All Rights Reserved
'Code is provided AS IS without any warranty


Imports XPEPMCLass.SJJEMS.XPEMAPI

Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents cmdRestart As System.Windows.Forms.Button
    Friend WithEvents cmdShutdown As System.Windows.Forms.Button
    Friend WithEvents cmdHib As System.Windows.Forms.Button
    Friend WithEvents cmdSTBY As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.cmdRestart = New System.Windows.Forms.Button
        Me.cmdShutdown = New System.Windows.Forms.Button
        Me.cmdHib = New System.Windows.Forms.Button
        Me.cmdSTBY = New System.Windows.Forms.Button
        Me.SuspendLayout()
        '
        'cmdRestart
        '
        Me.cmdRestart.Location = New System.Drawing.Point(160, 72)
        Me.cmdRestart.Name = "cmdRestart"
        Me.cmdRestart.Size = New System.Drawing.Size(88, 24)
        Me.cmdRestart.TabIndex = 0
        Me.cmdRestart.Text = "&Restart"
        '
        'cmdShutdown
        '
        Me.cmdShutdown.Location = New System.Drawing.Point(40, 72)
        Me.cmdShutdown.Name = "cmdShutdown"
        Me.cmdShutdown.Size = New System.Drawing.Size(80, 24)
        Me.cmdShutdown.TabIndex = 1
        Me.cmdShutdown.Text = "&Shutdown"
        '
        'cmdHib
        '
        Me.cmdHib.Location = New System.Drawing.Point(40, 128)
        Me.cmdHib.Name = "cmdHib"
        Me.cmdHib.Size = New System.Drawing.Size(80, 24)
        Me.cmdHib.TabIndex = 2
        Me.cmdHib.Text = "&Hibernate"
        '
        'cmdSTBY
        '
        Me.cmdSTBY.Location = New System.Drawing.Point(160, 128)
        Me.cmdSTBY.Name = "cmdSTBY"
        Me.cmdSTBY.Size = New System.Drawing.Size(88, 24)
        Me.cmdSTBY.TabIndex = 3
        Me.cmdSTBY.Text = "S&tandBy"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(292, 266)
        Me.Controls.Add(Me.cmdSTBY)
        Me.Controls.Add(Me.cmdHib)
        Me.Controls.Add(Me.cmdShutdown)
        Me.Controls.Add(Me.cmdRestart)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub cmdRestart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRestart.Click
        Dim PM As New XPEPMCLass.SJJEMS.XPEMAPI
        PM.XPE_ReStart()

    End Sub

    Private Sub cmdShutdown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdShutdown.Click
        Dim PM As New XPEPMCLass.SJJEMS.XPEMAPI
        PM.XPE_Shutdown()
    End Sub

    Private Sub cmdHib_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdHib.Click
        Dim PM As New XPEPMCLass.SJJEMS.XPEMAPI
        PM.XPE_Hibernate(True)
    End Sub

    Private Sub cmdSTBY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSTBY.Click
        Dim PM As New XPEPMCLass.SJJEMS.XPEMAPI
        PM.XPE_StandBy(True)
    End Sub
End Class
